package tsing.javase.quartz.job;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import tsing.javase.util.SpringContextUtils;

/**
 * @Date 2023/9/20 13:52
 * 老会员平台新告警执行器
 */

@Component
public class VipNewAlarmScheduler {

    public Logger logger = LoggerFactory.getLogger("vipnewalarm");
    /**
     * 每隔10分钟查询告警任务，并执行
     *
     * @throws Exception
     */
    @Scheduled(cron="0 0/10 * * * ?")
    public void vipNewAlarmMethod() throws Exception{
        logger.info("会员新告警调度器执行了！！！");
        VipNewAlarmService service = (VipNewAlarmService) SpringContextUtils.getBean(VipNewAlarmService.class);
        service.excute();
    }
}
